import React, { useEffect, Fragment } from 'react';
import { useNavigate } from 'react-router-dom';
import 'nprogress/nprogress.css';
import nprogress from 'nprogress';

const NProgress = props => {
    const navigate = useNavigate();
    useEffect(() => {
        nprogress.start();
        return () => {
            nprogress.done();
        };
    }, [navigate]);
    return <Fragment />;
};

export default NProgress;
